package com.hbzhit.modules.cm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hbzhit.common.entity.BaseEntity;
import com.hbzhit.common.utils.CacheUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * 内容发布
 *
 * @author hbzhit
 * @date 2019-07-23 15:25:46
 */
@ApiModel("内容发布")
@TableName("cm_content")
@Getter
@Setter
public class ContentEntity extends BaseEntity {

    @ApiModelProperty(value="节点标识")
    private String nodeFlag;

	@ApiModelProperty(value="发布类型")
    private Long contentType;

    @ApiModelProperty(value="发布标题")
    private String title;

	@ApiModelProperty(value="发布内容")
    private String content;


	@ApiModelProperty(value="概要")
    private String summary;


	@ApiModelProperty(value="封面图片")
    private String image;


	@ApiModelProperty(value="状态")
    private Integer status;


	@ApiModelProperty(value="排序")
    private Integer orderNum;

    @ApiModelProperty(value="浏览量")
    private Integer readNum;

    @ApiModelProperty(value="发布类型名称")
    @TableField(exist = false)
    private String contentTypeName;

    public String getContentTypeName() {
        return CacheUtils.getDictValCache(contentType).getValName();
    }
}
